package pojo;

public class Student extends User{

    private String hobbies;

    public Student() {
    }

    public Student(String username, String password, String name, String sex, int age, String photo, String hobbies) {
        super(username, password, name, sex, age, photo);
        this.hobbies = hobbies;
    }

    public String getHobbies() {
        return hobbies;
    }

    public void setHobbies(String hobbies) {
        this.hobbies = hobbies;
    }

    @Override
    public String toString() {
        return "Student{" +
                "hobbies='" + hobbies + '\'' +
                "} " + super.toString();
    }

//    //做分页的假数据
//    public static void main(String[] args) {
//
//        for (int i = 1; i < 100; i++) {
//            String username = "xiaohei" + i;
//            String password = "123123";
//            String name = "小黑" + i;
//            String sex = "man";
//            int age = 23;
//            String[] hobbies = {"football","basketball"};
//            try {
//                DBUtils.commonUpdate("insert into student(username,password,name,sex,age,hobbies) values(?,?,?,?,?,?)",username,password,name,sex,age, StringUtils.handleArray(hobbies));
//            } catch (SQLException e) {
//                throw new RuntimeException(e);
//            }
//        }
//    }
}
